package com.cn.service;

import com.cn.dao.Userdao;
import com.cn.entity.UserEntity;
import com.cn.serviceIntface.UserServiceIntface;

import java.sql.SQLException;
import java.util.List;

public class UserService implements UserServiceIntface {
    Userdao userdao = new Userdao();

    @Override
    public UserEntity queryOne(UserEntity userEntity, String type) throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException {
        return userdao.queryByPhone(userEntity, type);
    }

    @Override
    public int addUser(UserEntity userEntity) throws SQLException, ClassNotFoundException {
        return userdao.addUser(userEntity);
    }

    @Override
    public int updateUser(UserEntity userEntity, String type) throws SQLException, ClassNotFoundException {
        return userdao.updateUser(userEntity, type);
    }

    @Override
    public List<UserEntity> queryAll(Integer currentPageNo, Integer pageSize) throws SQLException, ClassNotFoundException {
        return null;
    }

    @Override
    public List<UserEntity> queryAll() {
        return null;
    }
}
